// 生辰唯一固定id
const idMap = new Map();
const unique = (prefix) => {
  let counter = 1;
  while (idMap.has(`${prefix}-${counter}`)) {
    counter++;
  }
  const id = `${prefix}-${counter}`;
  idMap.set(id, true);
  return id;
};
export default unique;
